import Vue from 'vue'
import Router from 'vue-router'
import findTalk from './views/search/find.vue'
import talkSubmit from './views/search/submit.vue'
import talkSay from './views/search/say.vue'
import top from './component/main/top.vue'
import middle from './component/main/middle.vue'
import font from './component/main/font.vue'
import myTop from './component/main/my_top.vue'
import attention from './views/my/attention.vue'
import about from './views/my/about.vue'
import comment from './views/my/comment.vue'
import publish from './views/my/publish.vue'

Vue.use(Router)
export default new Router({
    linkActiveClass: 'active',
    // 路由配置
    routes: [
        {
            name:'/',
            path: '/',
            components: {
                app,
                init_top:top,
                init_media: middle,
                init_font: font
            },
            children:[
                {
                    path :'/',
                    name : 'middle',
                    component:findTalk
                },
                {
                    name:'middle',
                    path:'/talk/find',
                    component: findTalk
                },
                {
                    name:'middle',
                    path:'/talk/submit',
                    component:talkSubmit
                },
                {
                    name:'middle',
                    path:'/talk/say',
                    component:talkSay
                }
            ]
        },{
            name:'my',
            path:'/my',
            components:{
                app,
                init_top: myTop,
                init_media:middle,
                init_font:font
            },
            children:[
                {
                    name:'middle',
                    path:'/my/attention',
                    component:attention
                },
                {
                    name:'middle',
                    path:'/my/about',
                    component:about
                },
                {
                    name:'middle',
                    path:'/my/publish',
                    component:publish
                },
                {
                    name:'middle',
                    path:'/my/comment',
                    component:comment
                }
            ]
        }
    ]
}) 